package com.victor9ac.tfm.provider.api;

import java.io.Serializable;
import java.util.Date;


public class Comment implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1477559308191909447L;

	public Comment() {
		super();
	}

	String author; 
	String text; 
	Date commentDate;
	CommentSource source;
	
	public Comment(String author, String text, Date date,CommentSource source) {
		super();
		this.author = author;
		this.text = text;
		this.commentDate = date;
		this.source = source;
	} 
	
	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Date getCommentDate() {
		return commentDate;
	}

	public void setCommentDate(Date commentDate) {
		this.commentDate = commentDate;
	}

	public CommentSource getSource() {
		return source;
	}

	public void setSource(CommentSource source) {
		this.source = source;
	}

	public String toString (){
		return "-> autor:"+author+ " - fecha:"+commentDate+" - Fuente: "+source.name()+"\n"
				+ "comentario"+text;
	}
	
}
